package com.abhinav.designPatterns.command;

public class Client {
	public static void main(String[] args) {
		RemoteControl remote = new RemoteControl();

		Light light = new Light();

		Command lightsOn = new LightOnCommand(light);
		Command lightsOff = new LightOffCommand(light);

		// switch on
		remote.setCommand(lightsOn);
		remote.pressButton();

		// switch on
		remote.setCommand(lightsOff);
		remote.pressButton();
	}
}
